package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.News;
import cn.wolfcode.trip.base.query.NewsQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface INewsService {

    PageInfo<News> query(QueryObject qo);

    void saveOrUpdate(News entity);

    /**
     * 查询所有的日报
     * @return
     */
    List<News> list();

    News get(Long id);

    /**
     * 更新日报是否发布的业务功能
     * @param id
     * @param isRelease
     */
    void changeStateBtn(Long id, Integer isRelease);

    String getContentById(Long id);

    void updateStateById(Long id, Integer state, Long userId);

    List<News> getNewsByTypeId(Long typeId, Long id);

    PageInfo<News> queryNewsStateByuserId(NewsQueryObject qo);
}
